package com.lianjia.sh.tools.config;

import com.lianjia.sh.tools.msg.v1.sender.Sender;
import com.lianjia.sh.tools.msg.v1.sender.impl.SenderCompositeImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Set;

/**
 * Created by yangsp1 on 16/6/24.
 */
@Configuration
public class SenderCompositeCfg {
    @Autowired
    Set<Sender> senders;

    @Bean(name = {"sender"})
    SenderCompositeImpl sender(){
        SenderCompositeImpl senderComposite = new SenderCompositeImpl();
        senderComposite.setSenders(senders);
        return senderComposite;
    }
}
